﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web;

namespace SaturniLibrary.SMS.SMBGLOBAL
{
    public class SMBGLOBALRequest
    {
        public long Transactionid { get; set; }
        public string Username { get; set; }
        public string Password { get; set; }
        public string Sender { get; set; }
        public string Text { get; set; }
        public string Recp { get; set; }

        public bool IsText { get; set; }

        public string ToRequestUrl()
        {
            return string.Format("http://api.smbglobal.net/api/sendsms?transactionid={0}&username={1}&password={2}&sender={3}&{4}={5}&recp={6}", Transactionid, Username, Password, Sender, IsText ? "text" : "binary", HttpUtility.UrlEncode(Text), Recp);
        }
    }
}
